package cn.xm.antrou.filebrowse.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.widget.Toast;
import cn.xm.antrou.filebrowse.R;

/** 
 * 提示
 * @author TANGHL
 * @date 2011-8-28 下午12:23:53 
 * Copyright (c) By ANTROU LTD. 2011 
 */
public class TipsUtils {

	public static void folderExistsTip(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.folder_exists));
		b.setNegativeButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	public static void errorOnCreateFolder(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.create_failed));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	
	public static void errorOnDeleteRootFileOrDir(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.can_not_delete_system));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	public static void errorOnRenameRootFileOrDir(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.can_not_rename_system));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	
	public static void errorOnMoveRootFileOrDir(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.can_not_move_system));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	public static void errorOnCopyRootFileOrDir(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.can_not_copy_system));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	
	public static void About(Context context){
		AlertDialog.Builder b = new AlertDialog.Builder(context);
		b.setTitle(context.getResources().getString(R.string.about));
		b.setMessage(context.getResources().getString(R.string.about));
		b.setPositiveButton(context.getResources().getString(R.string.ok), null);
		b.create();
		b.show();
	}
	
	
	public static void errorOnNotSelectFile(Context context){
		Toast.makeText(context, context.getResources().getString(R.string.not_choice), Toast.LENGTH_SHORT).show();
	}
	
	
}
